import React, {
    Component
  } from 'react';
  import {
    View,
    Platform,
    KeyboardAvoidingView
  } from 'react-native';

class LmmKeyboardAvoidingView extends Component {
    constructor(props) {
      super(props);
    }

    render() {
        if (Platform.OS == "ios"){
            let behavior = 'padding'

            if (this.props.behavior != undefined){
                behavior = this.props.behavior
            }

            return <KeyboardAvoidingView style={{flex: 1}} behavior={behavior} keyboardVerticalOffset={ this.props.keyboardVerticalOffset }>
                {this.props.children}
            </KeyboardAvoidingView>
        }else{
            return <View>
                {this.props.children}
            </View>
        }
    }
}

export default LmmKeyboardAvoidingView;